<template>
	<view class="music-head" :style="{color: color}">
		<view class="music-head-icon" v-if="icon" :class="{'music-head-iconblack': iconblack}">
			<text class="iconfont icon-zuojiantou" @tap="handleToBack"></text>|<text class="iconfont icon-shouye" @tap="handleToHome"></text>
		</view>
		{{ title }}
	</view>
</template>

<script>
	export default {
		name:"musichead",
		data() {
			return {
				
			};
		},
		props:['title', 'icon', 'color', 'iconblack'],
		methods:{
			handleToBack(){
				uni.navigateBack()
			},
			handleToHome(){
				uni.navigateTo({
					url: '../../pages/index/index'
				})
			}
		}
	}
</script>

<style scoped>
.music-head{
	width: 100%;
	height: 150rpx;
	font-size: 32rpx;
	line-height: 160rpx;
	text-align: center;
	color: #2C405A;
	position: relative;
}
.music-head-icon{
	position: absolute;
	left: 16rpx;
	top: 48rpx;
	width: 180rpx;
	height: 60rpx;
	background-color: rgba(0, 0, 0, 0.4);
	color: #FFFFFF;
	line-height: 60rpx;
	display: flex;
	justify-content: space-around;
	border-radius: 30rpx;
	
}
.music-head-iconblack{
	color: #000000;
	background-color: #FFFFFF;
	border: 1px solid #eaeaea;
}
</style>
